﻿using System.Threading.Tasks;
using ECommerce.AuthService.Models;

namespace ECommerce.AuthService.Services;

/// <summary>
/// 认证服务接口
/// </summary>
public interface IAuthService
{
    /// <summary>
    /// 用户注册
    /// </summary>
    Task<AuthResult> RegisterAsync(RegisterRequest request);

    /// <summary>
    /// 用户登录
    /// </summary>
    Task<AuthResult> LoginAsync(LoginRequest request);

    /// <summary>
    /// 刷新令牌
    /// </summary>
    Task<AuthResult> RefreshTokenAsync(string refreshToken);

    /// <summary>
    /// 注销（吊销令牌）
    /// </summary>
    Task<AuthResult> LogoutAsync(Guid userId, string refreshToken);
}
